import { $http } from '@escook/request-miniprogram/miniprogram_dist/index.js';
$http.baseUrl = 'https://api-hmugo-web.itheima.net';

$http.beforeRequest = function () {
  uni.showLoading({ title: '加载中...' });
};

$http.afterRequest = function () {
  uni.hideLoading();
};

uni.$http = $http; // 这行必须确保 request.js 被 main.js 先引入
export default $http